﻿namespace Vdc.Grid
{
    using System;
    using System.ComponentModel;

    public class GridTemplateSettings : GridPersistentObject, ICloneable
    {
        public object Clone()
        {
            return new GridTemplateSettings { FilterApplyButton_TemplateId = this.FilterApplyButton_TemplateId, FilterHideButton_TemplateId = this.FilterHideButton_TemplateId, FilterRemoveButton_TemplateId = this.FilterRemoveButton_TemplateId, FilterShowButton_TemplateId = this.FilterShowButton_TemplateId, GroupHeaderTemplateId = this.GroupHeaderTemplateId, HeadingTemplateId = this.HeadingTemplateId, ManualPagingTemplateId = this.ManualPagingTemplateId, MultiRecordSaveCancel_TemplateId = this.MultiRecordSaveCancel_TemplateId, NewRecord_EditTemplateId = this.NewRecord_EditTemplateId, NewRecord_TemplateId = this.NewRecord_TemplateId, RowEditTemplateId = this.RowEditTemplateId };
        }

        object ICloneable.Clone()
        {
            return this.Clone();
        }

        [Bindable(true), DefaultValue(""), Category("Templates"), Description("Template for the \"Apply Filter\" button.")]
        public string FilterApplyButton_TemplateId
        {
            get
            {
                object obj2 = this.ViewState["FilterApplyButton_TemplateId"];
                if (obj2 != null)
                {
                    return obj2.ToString();
                }
                return "";
            }
            set
            {
                this.ViewState["FilterApplyButton_TemplateId"] = value;
            }
        }

        [Category("Templates"), Description("Template for the \"Hide Filter\" button."), Bindable(true), DefaultValue("")]
        public string FilterHideButton_TemplateId
        {
            get
            {
                object obj2 = this.ViewState["FilterHideButton_TemplateId"];
                if (obj2 != null)
                {
                    return obj2.ToString();
                }
                return "";
            }
            set
            {
                this.ViewState["FilterHideButton_TemplateId"] = value;
            }
        }

        [DefaultValue(""), Category("Templates"), Bindable(true), Description("Template for the \"Remove Filter\" button.")]
        public string FilterRemoveButton_TemplateId
        {
            get
            {
                object obj2 = this.ViewState["FilterRemoveButton_TemplateId"];
                if (obj2 != null)
                {
                    return obj2.ToString();
                }
                return "";
            }
            set
            {
                this.ViewState["FilterRemoveButton_TemplateId"] = value;
            }
        }

        [Category("Templates"), DefaultValue(""), Description("Template for the \"Show Filter\" button."), Bindable(true)]
        public string FilterShowButton_TemplateId
        {
            get
            {
                object obj2 = this.ViewState["FilterShowButton_TemplateId"];
                if (obj2 != null)
                {
                    return obj2.ToString();
                }
                return "";
            }
            set
            {
                this.ViewState["FilterShowButton_TemplateId"] = value;
            }
        }

        [Description("Template that will be used for the group headers."), Category("Templates"), Bindable(true), DefaultValue("")]
        public string GroupHeaderTemplateId
        {
            get
            {
                object obj2 = this.ViewState["GroupHeaderTemplateId"];
                if (obj2 != null)
                {
                    return obj2.ToString();
                }
                return "";
            }
            set
            {
                this.ViewState["GroupHeaderTemplateId"] = value;
            }
        }

        [Category("Templates"), Bindable(true), Description("Gets or sets the ID of the template for the heading section."), DefaultValue("")]
        public string HeadingTemplateId
        {
            get
            {
                object obj2 = this.ViewState["HeadingTemplateId"];
                if (obj2 != null)
                {
                    return obj2.ToString();
                }
                return "";
            }
            set
            {
                this.ViewState["HeadingTemplateId"] = value;
            }
        }

        [Category("Templates"), DefaultValue(""), Description("Template for the manual paging section from the footer."), Bindable(true)]
        public string ManualPagingTemplateId
        {
            get
            {
                object obj2 = this.ViewState["ManualPagingTemplateId"];
                if (obj2 != null)
                {
                    return obj2.ToString();
                }
                return "";
            }
            set
            {
                this.ViewState["ManualPagingTemplateId"] = value;
            }
        }

        [Bindable(true), Category("Templates"), DefaultValue(""), Description("Template for the \"Save All | Cancel All\" buttons.")]
        public string MultiRecordSaveCancel_TemplateId
        {
            get
            {
                object obj2 = this.ViewState["MultiRecordSaveCancel_TemplateId"];
                if (obj2 != null)
                {
                    return obj2.ToString();
                }
                return "";
            }
            set
            {
                this.ViewState["MultiRecordSaveCancel_TemplateId"] = value;
            }
        }

        [Description("Template for the \"Save | Cancel\" buttons."), DefaultValue(""), Bindable(true), Category("Templates")]
        public string NewRecord_EditTemplateId
        {
            get
            {
                object obj2 = this.ViewState["NewRecord_EditTemplateId"];
                if (obj2 != null)
                {
                    return obj2.ToString();
                }
                return "";
            }
            set
            {
                this.ViewState["NewRecord_EditTemplateId"] = value;
            }
        }

        [Description("Template for the \"Add new\" button."), Category("Templates"), Bindable(true), DefaultValue("")]
        public string NewRecord_TemplateId
        {
            get
            {
                object obj2 = this.ViewState["NewRecord_TemplateId"];
                if (obj2 != null)
                {
                    return obj2.ToString();
                }
                return "";
            }
            set
            {
                this.ViewState["NewRecord_TemplateId"] = value;
            }
        }

        [Description("Template that will be used for the entire row."), DefaultValue(""), Bindable(true), Category("Templates")]
        public string RowEditTemplateId
        {
            get
            {
                object obj2 = this.ViewState["RowEditTemplateId"];
                if (obj2 != null)
                {
                    return obj2.ToString();
                }
                return "";
            }
            set
            {
                this.ViewState["RowEditTemplateId"] = value;
            }
        }
    }
}

